import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import com.google.gson.Gson;

import nl.ansuz.android.steam.dota.request.DotaRequest;
import nl.ansuz.android.steam.dota.request.match.GetMatchDetails;
import nl.ansuz.android.steam.dota.response.match.GetMatchDetailsResponse;
import nl.ansuz.android.steam.request.SteamRequest;
import nl.ansuz.android.steam.util.GsonUtil;


public class Test1 {
	public static void main(String[] args) throws IOException {
		GetMatchDetails getMatchDetails = new GetMatchDetails();
		Map<String, String> params = new HashMap<String, String>();
		params.put(SteamRequest.Parameter.API_KEY, "18755ABB58C0BE96815AE471FBB1C3F2");
		params.put(GetMatchDetails.Parameter.MATCH_ID, "304918631");
		
		String url = getMatchDetails.createRequestUrl(DotaRequest.ApplicationID.LIVE, params);
		
		System.out.println(url);
		
		String resopnse = ManipulaHttp2.executaConsulta(url);
		System.out.println(resopnse);
		
		GsonUtil gsonUtil = new GsonUtil();
		
		Gson gson = new Gson();
		
		GetMatchDetailsResponse getMatchDetailsResponse = gson.fromJson(gsonUtil.getStrippedDotaResult(resopnse), GetMatchDetailsResponse.class);
		
		System.out.println(getMatchDetailsResponse.players[0].abilityUpgrades[0].ability);
		
		
		
	}
}
